<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">    
    <title>header</title>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>  
  <body>
	<div>  
    <s:url includeParams="none" namespace="/" id="url" action="index.ra" /><s:a href="%{url}"><s:text name="home" /></s:a>
    <s:if test="%{#session.userId == null}">
		<a href="<s:url includeParams="none" namespace="/" action="login" />" >
		<s:text name="login" />
		</a>
	</s:if>
	<s:elseif test="%{#session.userRole == '1'}">
		<a href="<s:url includeParams="none" namespace="/" action="logout" />" >
		<s:property value="%{#session.userfullname}"/>&nbsp;<s:text name="loggedin" />
		<s:text name="logout" />
		</a>
	</s:elseif>
	<s:else>
		<s:property value="%{#session.userfullname}"/>&nbsp;<s:text name="loggedin" />
		<a href="<s:url includeParams="none" namespace="/" action="logout" />" >
		<s:text name="logout" />
		</a>
	</s:else>
	</div>
  </body>
</html>
